package com.sptpc.drink.dao;

import com.sptpc.drink.pojo.Category;
import com.sptpc.drink.pojo.Drink;

import java.util.List;

public interface DrinkMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Drink record);

    int insertSelective(Drink record);

    Drink selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Drink record);

    int updateByPrimaryKey(Drink record);

    List<Drink> selectAll();

    //查询drink的信息，包含此category下面所有的drink信息
    List<Drink> selectDrinkAndCategory();


    //查询某个category下面所有的drink信息
    List<Drink> selectDrinkByCategory(long id);

    //根据名字查询drink信息，模糊查询，可能会查询出多drink，所以返回类型用list
    List<Drink> selectDrinkByName(String name);
}